/*
 * Copyright (c) 2007 centrevillage <centrevillage@gmail.com>
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#ifndef  __RAVI_EVALUATES_HPP__
#define  __RAVI_EVALUATES_HPP__

// std
#include <string>

// boost
#include <boost/variant.hpp>

// ravi
#include "types.hpp"

namespace ravi {

int eval_bool(const val_t& v); 
std::string eval_string(const val_t& v); 
inline void guard_int(std::string op, const val_t& v); 
inline void guard_int(std::string op, const val_t& lv, const val_t& rv); 
inline void guard_type(std::string op, const val_t& lv, const val_t& rv); 
val_t eval_range(val_t& lv, val_t& rv); 
val_t eval_1_minus(const val_t& val); 
val_t eval_1_plus(const val_t& val); 
val_t eval_1_logical_not(const val_t& val); 
val_t eval_mod(val_t& lv, val_t& rv); 
val_t eval_div(val_t& lv, val_t& rv); 
val_t eval_multi(val_t& lv, val_t& rv); 
val_t eval_minus(val_t& lv, val_t& rv); 
val_t eval_plus(val_t& lv, val_t& rv); 
val_t eval_strcat(val_t& lv, val_t& rv); 
int_t eval_int(const val_t& v); 
void eval_add(val_t& lhs, val_t& rhs); 
void eval_addex(val_t& lhs, val_t& rhs); 
rational<int> eval_rational(const val_t& v); 
val_t eval_rational_div(val_t& lv, val_t& rv); 
val_t eval_rational_multi(val_t& lv, val_t& rv); 
val_t eval_rational_plus(val_t& lv, val_t& rv); 
val_t eval_rational_minus(val_t& lv, val_t& rv); 
val_t eval_greater(val_t& lv, val_t& rv); 
val_t eval_less(val_t& lv, val_t& rv); 
val_t eval_greater_equal(val_t& lv, val_t& rv); 
val_t eval_less_equal(val_t& lv, val_t& rv); 
val_t eval_equal(val_t& lv, val_t& rv); 
val_t eval_not_equal(val_t& lv, val_t& rv); 
val_t eval_logical_and(val_t& lv, val_t& rv); 
val_t eval_logical_or(val_t& lv, val_t& rv); 

}		/* -----  end of namespace  ravi  ----- */
#endif   /* ----- #ifndef __RAVI_EVALUATES_HPP__  ----- */
